% Introduction

\chapter{Evaluation} % Main chapter title

\label{Chapter 6} % For referencing the chapter elsewhere, use \ref{Chapter1} 

\lhead{Chapter 6. \emph{Evaluation}} % This is for the header on each page - perhaps a shortened title

%\citep{Reference3}

This chapter compares the performance of the on-premise version against the cloud version of the Data Layer of the RTCP system. In order to do this a set of test suits was implemented.

\section{The test suits}

For testing the performance of the different operations performed over the Data Layer of the system, the Users module was taken as a reference. Since all modules of the Data Access Layer contain the following operations: \verb|create, edit, findById|, \verb|findAllrecods|, the test suits were designed to evaluate the performance of these operations both in the non-cloud and cloud-version of the Data Layer.

The tests themselves consisted of 20 simulated users who were using the system simultaneously and performed the operations listed above. The implemented tests were the following:

\begin{enumerate}
	\item Writing test: 20 simulated users create each 1 new user records.
	\item Updating test: 20 simulated users update each 1 user records.
	\item Find by ID test: 20 simulated users search 1 user record using the ID field.
	\item Find all users test: 20 simulated users get each all user records.
	%\item Delete test: 20 simulated users delete each 1 user records.
\end{enumerate}

%The first version to be tested was the cloud-version. This
The all tests were executed on a single machine with an Intel(R) Pentium(R) CPU P6200 clocked at 2,13 GHz and 3GB memory running with Windows 7 Home Basic 64 Bit. 

In order to run the test against the cloud version of the Data Layer, the tests were designed to consume the services enabled by this layer. To understand how the tests were executed against the cloud version, the figure  \ref{fig:writing_test_and_data_layer} shows an example in which the Writing test (which is running on a local server) sends SOAP requests to access to the services of the Data Layer (which is running on the Cloud).

\begin{figure}[H]
	\centering
		\includegraphics[width=0.8\textwidth]{Figures/writing_terst_and_data_layer.png}
		\rule{30em}{0.5pt}
	\caption[Interaction between Writing test and the Cloud Data Layer.]{Interaction between Writing test and the Cloud Data Layer.}
	\label{fig:writing_test_and_data_layer}
\end{figure}

Each test was running 5 time and the overage was taken as the result. Table shows the results of the different tests.

\begin{table}[!hbt]
\begin{center}
\begin{tabular}{|p{5cm} |p{4cm} | p{4cm} |}
\hline
\textbf{Tests} & \textbf{Cloud version} & \textbf{On-premise version}\\
\hline
Writing test & 5719 ms & 4884 ms\\
\hline
Updating test & 9682 ms & 3524 ms\\
\hline
Find by ID test & 5416 ms & 5230 ms\\
\hline
Find all users test & 31886 ms & 18792 ms\\
%\hline
%Delete test &  & \\
\hline
\end{tabular}
\caption{Performance results}
\end{center}
\end{table}


The table shows that the slowest overage times are observed in the on-premise version for all test cases. This was expected due to the latency caused by the remote communication via internet between the Data Layer and the executed tests. However, the results show that in the cases where single operations are executed (create a new user, find a user), there is no critical differences in performance between the on-premise and the Cloud versions. 


